module libeventd.changelist.Internal;

import libeventd.Types;

enum{
	EV_CHANGE_ADD		= 0x01,
	EV_CHANGE_DEL		= 0x02,
	EV_CHANGE_SIGNAL	= EV_SIGNAL,
	EV_CHANGE_PERSIST	= EV_PERSIST,
	EV_CHANGE_ET		= EV_ET,
}

const EVENT_CHANGELIST_FDINFO_SIZE = ev_int.sizeof;

extern(C):

struct event_change {
	evutil_socket_t	fd;
	ev_short		old_events;
	ev_uint8_t		read_change;
	ev_uint8_t		write_change;
}

void event_changelist_init( event_changelist *changelist);
void event_changelist_remove_all( event_changelist *changelist,     event_base *base);
void event_changelist_freemem( event_changelist *changelist);
ev_int event_changelist_add( event_base *base, evutil_socket_t fd, ev_short old, ev_short events,  void *p);
ev_int event_changelist_del( event_base *base, evutil_socket_t fd, ev_short old, ev_short events,  void *p);